Generate Equivalent Questions
You can use the GetResources action to suggest equivalent questions that match a particular question equivalence class. This option requires you to configure an LLM module in your AnswerBank system, and Answer Server uses the LLM to generate the equivalent questions. You can then choose whether to add the new equivalent questions to the equivalence class.
Configure the LLM Module
The AnswerBank question suggestion requires the same type of LLM module as the RAG system. To configure AnswerBank to use an LLM module, you add the ModuleID parameter to your Answer Bank configuration. You then configure the LLM Module in the same way as for a RAG system. For more information, see Configure the LLM Module.
For example:
[MyAnswerBank] ... ModuleID=LLMExtractiveQuestionAnswering [LLMExtractiveQuestionAnswering] Type=ExtractiveQuestionAnsweringLLM ModelName=distilbert/distilbert-base-uncased
Request Equivalent Questions
To request equivalent questions, you send a GetResources with the ID of the question equivalence class that you want to generate questions for.
For example:
http://localhost:12000?Action=GetResources&SystemName=MyAnswerbank&Type=question_suggestion&IDs=9706856188043740111
This example generates questions that are equivalent to the reference question in the question equivalence class with the ID 9706856188043740111.
When you receive the generated equivalence questions, you can choose suitable questions and add them to the Answer Bank by using the ManageResources action. See Add a Question. Then you can add these new questions to the question equivalence class by using the ManageResources action. See Update a Question Equivalence Class.
Use a Custom Prompt Template
By default, when you send the GetResources to suggest questions, Answer Server uses a default prompt template. You can optionally create a custom prompt template, by create a text file with your template, and adding it to the Answer Bank configuration by setting the SuggestQuestionsPromptTemplatePath configuration parameter. For information about the prompt template, see SuggestQuestionsPromptTemplatePath.